/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jpapractica;

import java.util.Date;
import java.util.List;
import javax.persistence.*;

@Entity
public class Director extends Person{


    
    @Id int id;
    @OneToMany
    List<Movie> movies;
    
    public Director(){}
    public Director(int id){
        this.id = id;
    }
    public Director(int id, String name, String lastname, String picture,
                            String birthplace, int dia, int mes, int ano){
        super(id, name, lastname, picture, birthplace, dia, mes, ano);
    
            }
        public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public List<Movie> getMovies() {
        return movies;
    }

    public void setMovies(List<Movie> movies) {
        this.movies = movies;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public Date getBirthdate() {
        return birthdate;
    }

    public void setBirthdate(int dia,int mes, int ano) {
        this.birthdate = new Date(dia,mes,ano);
    }

    public String getBirthplace() {
        return birthplace;
    }

    public void setBirthplace(String birthplace) {
        this.birthplace = birthplace;
    }
    
}
